/**
 * 
 */
package study;

/**
 * @author admin
 *
 */
import java.io.*;
public class Test {
//	String value;
//	public Test(String vlaue){
//		this.value=value;
//	}
	public String getString()throws IOException{
		StringBuilder sb=new StringBuilder();
		InputStream inputData=System.in;
		DataInputStream dis=new DataInputStream(inputData);
		int i=-1;
		while((i=dis.read())!=-1){
			sb.append((char)i);
			
		}
		dis.close();
		return sb.toString();
		
	}
	public void inputData(String value)throws IOException{
		
		if(value==null){
			return;
		}
		
		byte[] bytes=value.getBytes();
		ByteArrayInputStream bis=new ByteArrayInputStream(bytes);
		ByteArrayOutputStream bos=new ByteArrayOutputStream();
		int i=0;
		while((i=bis.read())!=-1){
			bos.write(i);
		}
		System.out.println(bos.toString());
		bos.close();
		bis.close();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args)throws Exception {
		// TODO Auto-generated method stub
		Test t1=new Test();
		String value=t1.getString();
		t1.inputData(value);

	}

}
